#!/bin/sh
# - nr_threads
# - duration
# - iterations
# - mmap
# - linear

## ebizzy is designed to generate a workload resembling common
## webapplication server workloads. It is highly threaded,
## has a large in-memory working set, and allocates
## and deallocates memory frequently.

. $LKP_SRC/lib/reproduce-log.sh

cd $BENCHMARK_ROOT/ebizzy || die "no $BENCHMARK_ROOT/ebizzy"

duration=${duration%%s}

[ -n "$mmap" ] && opt_mmap=" -m "
[ -n "$linear" ] && opt_linear=" -z "


for i in $(seq 1 $iterations)
do
	echo Iteration: $i
	log_cmd ./ebizzy -t $nr_threads -S $duration \
		$opt_mmap $opt_linear
done
